<%= render :partial => 'spree/admin/shared/order_tabs', locals: { current: 'Payments' }%>

<% admin_breadcrumb(Spree::Payment.model_name.human) %>
<% admin_breadcrumb(plural_resource_name(Spree::LogEntry)) %>

<% content_for :page_actions do %>
  <li><%= button_link_to Spree.t(:logs), spree.admin_order_payment_log_entries_url(@order, @payment) %></li>
  <li><%= button_link_to Spree.t(:back_to_payment), spree.admin_order_payment_url(@order, @payment) %></li>
<% end %>

<table class='index' id='listing_log_entries'>
  <% @log_entries.each do |entry| %>
      <thead>
        <tr class="log_entry <%= entry.parsed_details.success? ? 'success' : 'fail' %>">
          <td colspan='2'>
            <h4><i class='fa fa-<%= entry.parsed_details.success? ? 'ok-circle' : 'remove-sign' %>'></i> <%= pretty_time(entry.created_at) %></h4>
          </td>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>Message</td>
          <td>
            <pre><%= entry.parsed_details.message %></pre>
          </td>
        </tr>
      </tbody>
  <% end %>
</table>
